package io.github.jsp.service;


import io.github.jsp.model.Task;
import io.github.jsp.model.TaskExecution;

import java.util.Date;
import java.util.List;

public interface TaskService {
    List<Task> findAllEnabledTasks();
    Task findTaskById(int id);
    boolean addTask(Task task);
    boolean updateTask(Task task);
    boolean deleteTask(int id);
    boolean toggleTaskStatus(int id, String status);
    boolean executeTaskNow(int id);
    List<TaskExecution> getTaskExecutionHistory(int taskId);
    Date getNextRunTime(String cronExpression);
}